

		//修改律师助理信息窗口
		var modifyWin;
		//待修改的律师助理信息form对象
		var modifyAssistInfoPanel;
		//接收原文件存储器
		var stores;
		//修改律师助理信息函数
		function modifyAssistInfo(grid,store){
			stores=store;
		var record = grid.getSelectionModel().getSelected();
        if (!record) {
           Ext.MessageBox.alert('修改操作','请选择要修改的一项！');
        } else {
            myFormWin();

                Ext.getCmp("massistid").setValue(record.get("lawassisid"));
            	Ext.getCmp("massistname").setValue(record.get("lawassisname"));
            	Ext.getCmp("massistbirthtime").setValue(record.get("birthtime"));
            	Ext.getCmp("massistsex").setValue(record.get("lawassissex"));
            	Ext.getCmp("massistpstatus").setValue(record.get("politicalstatus"));
            	Ext.getCmp("massistedulevel").setValue(record.get("educationallevel"));
            	Ext.getCmp("massistgradschool").setValue(record.get("graduateschool"));
            	Ext.getCmp("massistphone").setValue(record.get("lawassisphone"));
            	Ext.getCmp("massistagreement").setValue(record.get("lawagreement"));
            	Ext.getCmp("massistidennumb").setValue(record.get("identitynumber"));
            	Ext.getCmp("massistemail").setValue(record.get("lawassisemail"));
                Ext.getCmp("massistpranumb").setValue(record.get("practicenumber"));
                Ext.getCmp("massistteacher").setValue(record.get("guidteacher"));

                 Ext.getCmp("massiststarttime").setValue(record.get("starttime"));
                 Ext.getCmp("massistendtime").setValue(record.get("endtime"));
                 Ext.getCmp("massistfrontoccupation").setValue(record.get("frontoccupation"));
                 Ext.getCmp("massisthousehold").setValue(record.get("householeaddr"));
                 Ext.getCmp("massistarchive").setValue(record.get("archiveaddr"));
                 Ext.getCmp("massisteligible").setValue(record.get("eligiblenumb"));
        }
		}
		//修改律师信息窗口
		var myFormWin = function() {
            modifyWin = new Ext.Window( {
                layout : 'fit',
                width : 800,
                height : 450,
                closeAction : 'hide',
                plain : true,
                title : '修改律师助理信息窗口',
                items : modifyAssistInfoPanel
            });
        modifyWin.show();
    };

    modifyAssistInfoPanel = new Ext.FormPanel( {
         collapsible : true,// 是否可以展开
        labelWidth : 100, // label settings here cascade unless overridden
        frame : true,
        labelAlign:'right',
        buttonAlign:'center',
        bodyStyle : 'padding:5px 5px 0',
        waitMsgTarget : true,

        defaults : {
            width : 230
        },
        defaultType : 'textfield',

        items : [
        {
            fieldLabel : '律师助理ID',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'massistid',
            readOnly:true,
             id :'massistid',
            allowBlank :false
        },
        {
            fieldLabel : '律师助理姓名',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'massistname',
             id :'massistname',
            allowBlank :false
        },
        {
                   fieldLabel :'出生年月',
					id :'massistbirthtime',
					name :'massistbirthtime',
					itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
					allowBlank :true
        },

        {
            fieldLabel : '性别',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistsex',
            id:"massistsex",
            allowBlank : false
        },
        {
            fieldLabel : '政治面貌',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistpstatus',
            id:"massistpstatus",
            allowBlank : false
        },
        {
            fieldLabel : '文化水平',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistedulevel',
            id:"massistedulevel",
            allowBlank : false
        },

         {
            fieldLabel : '毕业院校',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistgradschool',
            id:"massistgradschool",
            allowBlank : false
        },
        {
            fieldLabel : '联系方式',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistphone',
            id:"massistphone",
            allowBlank : false
        },

         {
            fieldLabel : '身份证号',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistidennumb',
            id:"massistidennumb",
            allowBlank : false
        },

         {
            fieldLabel : '邮箱',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistemail',
            id:"massistemail",
            allowBlank : false
        },
         {
            fieldLabel : '实习证号',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistpranumb',
            id:"massistpranumb",
            allowBlank : false
        },
        {
            fieldLabel : '实习指导老师',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistteacher',
            id:"massistteacher",
            allowBlank : false
        },

        {
            fieldLabel : '协议年限',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'assistagreement',
            id:"massistagreement",
            allowBlank : false
        },
        {
            fieldLabel : '协议开始时间',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massiststarttime',
            id:"massiststarttime",
            allowBlank : false
        },
        {
            fieldLabel : '协议结束时间',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistendtime',
            id:"massistendtime",
            allowBlank : false
        },
        {
            fieldLabel : '前职业',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistfrontoccupation',
            id:"massistfrontoccupation",
            allowBlank : false
        },
        {
            fieldLabel : '户籍所在地',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massisthousehold',
            id:"massisthousehold",
            allowBlank : false
        },
        {
            fieldLabel : '档案所在地',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massistarchive',
            id:"massistarchive",
            allowBlank : false
        },
        {
            fieldLabel : '资格证号',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'massisteligible',
            id:"massisteligible",
            allowBlank : false
        }
        ],

        buttons : [ {
            text : '保存',
            iconCls:'save',
            disabled : false,
            handler : function() {
                if (modifyAssistInfoPanel.form.isValid()) {
                    modifyAssistInfoPanel.form.submit( {
                        url : 'ModifyAssistInfo.jsj',
                        success : function(from, action) {
                         Ext.MessageBox.alert('保存结果', action.result.message);
                            stores.load( {
                                params : {
                                    start : 0,
                                    limit : 5
                                }
                            });
                            modifyWin.hide();
                        },
                        failure : function(form, action) {
                           Ext.MessageBox.alert('保存结果', action.result.message);
                             stores.load( {
                                params : {
                                    start : 0,
                                    limit : 5
                                }
                            });
                            modifyWin.hide();
                        },
                        waitMsg : '正在保存数据，稍后...'
                    });
                   // dialog.hide();
                } else {
                    Ext.Msg.alert('信息', '请填写完成再提交!');
                }
            }
        }, {
            text : '取消',
            iconCls:'cancel',
            handler : function() {
                modifyWin.hide();
            }
        }]
    });